public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.createBinaryTree();

        //前序遍历
        binaryTree.preOrder(root);
        System.out.println();

        //中序遍历
        binaryTree.inOrder(root);
        System.out.println();

        //后续遍历
        binaryTree.postOrder(root);
        System.out.println();

        System.out.println(binaryTree.size(root));

        System.out.println(binaryTree.getLeafNodeCount(root));

        System.out.println(binaryTree.getKLevelNodeCount(root, 1));
        System.out.println(binaryTree.getKLevelNodeCount(root, 2));
        System.out.println(binaryTree.getKLevelNodeCount(root, 3));
        System.out.println(binaryTree.getKLevelNodeCount(root, 4));
        System.out.println(binaryTree.getKLevelNodeCount(root, 5));

        System.out.println(binaryTree.getHeight(root));

        BinaryTree.TreeNode node=binaryTree.find(root, 'A');
        System.out.println(node.val);

        binaryTree.levelOrder(root);
        System.out.println();

        System.out.println(binaryTree.isCompleteTree(root));
    }
}
